Why overflowing stack seems to cause program to hung and not segmentation fault